<template>
  <div>
    <!-- -->
    <div>局部过滤(filters)：{{ timestamp | formateTime}}</div>
    <div>全局过滤(Vue.filter)：{{ "个人信息xxxx" | filterMsg}}</div>
  </div>
</template>

<script>
import dayjs from "dayjs";


export default {
  name: 'Filters',

  data() {
    return {
      timestamp:Date.now()
    };
  },

  mounted() {
    
  },
  filters:{
    formateTime(value,str="YYYY MMMM DD"){
       return dayjs(value).format(str);
    }
  },
  methods: {
    
  },
};
</script>